(function(angular) {
	'use strict';
	angular.module("fs.waf").factory("processService", processService);
	processService.$inject = [ '$q', 'loggerFactory', 'ajaxServiceFactory' ];
	function processService($q, loggerFactory, ajaxServiceFactory) {
		var log = loggerFactory.getLogger("processService"), ajaxService = ajaxServiceFactory.buildAjaxService({
			getProcessOptions : {
				url : 'do/cda/dataList/processOptions',
				method : 'get'
			}
		
		});
		
		function getProcessOptions() {
			var defer = $q.defer();
			ajaxService.getProcessOptions().then(function(response) {
				var processOptions = {};
				if (response.data) {
					angular.forEach(response.data, function(value, key) {
						var tempValue = {};
						tempValue.data = value;
						processOptions[key] = tempValue;
					});
				}
				defer.resolve(processOptions);
			});
			return defer.promise;
		}
		return {
			getProcessOptions : getProcessOptions
		};
	}
})(angular);